package com.ihai.spring.boot.sample.activemq;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.jms.config.JmsListenerContainerFactory;
import org.springframework.jms.config.SimpleJmsListenerContainerFactory;

import javax.jms.ConnectionFactory;
import javax.jms.Message;

/**
 * DESC
 *
 * @author 张驰
 * @date 2020/6/22
 */
@SpringBootApplication
public class ActiveMqApplication {
    public static void main(String[] args) {
        SpringApplication.run(ActiveMqApplication.class,args);
    }
//    @JmsListener(destination="in")
//    public void readInQueue(String message) {
//        System.out.println("in接受到：" + message);
//    }
    @JmsListener(destination="in")
    public void readOutQueue(Message message) {
        System.out.println("out接受到：" + message);
    }
}
